package com.train.${module}.po;

<#list typeSet as type>
<#if type=='LocalDate'>
import java.time.LocalDate;
<#elseif type=='LocalTime'>
import java.time.LocalTime;
<#elseif type=='LocalDatetime'>
import java.time.LocalDateTime;
</#if>
<#if type=='BigDecimal'>
import java.math.BigDecimal;
</#if>
</#list>

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * ${tableNameCn}
 * @author ${author}
 * @TableName ${tableName}
 * @createDate ${date}
 */
@TableName(value ="${tableName}")
@Data
public class ${Domain}PO implements Serializable {

<#list fieldList as field>

    /**
    * ${field.comment}
    */
    <#if field.name == "id">
    @TableId
    </#if>
    <#-- 将 Date 类型替换为 LocalDateTime 类型 -->
    <#if field.nameHump == "createTime">
    @TableField(fill = FieldFill.INSERT)
    <#elseif field.nameHump == "updateTime">
    @TableField(fill = FieldFill.INSERT_UPDATE)
    </#if>
    private ${field.javaType} ${field.nameHump};
</#list>

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
